﻿using System.Web.Services;

namespace Lhz.Framework.Test.Service
{
    /// <summary>
    /// WebServiceCookieTest 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    public class WebServiceCookieTest : System.Web.Services.WebService
    {
        [WebMethod(EnableSession = true)]
        public int GetId()
        {
            var id = Session["id"];
            if (id == null)
            {
                Session["id"] = 1;
            }
            else
            {
                Session["id"] = (int)id + 1;
            }
            return (int)Session["id"];
        }
    }
}
